package net.towee.model.repo;

import java.util.Date;
import java.util.List;

import net.towee.model.ProfileContainer;
import net.towee.model.discussion.Discussion;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * Model of document
 * @author     c58
 */
public interface DocumentData extends IsSerializable  {	
	/**
	 * @return document identity
	 */
	DocumentIdentity getIdentity();
	
	/**
	 * @return document revisions list
	 */
	List<DocumentDiff> getDiffs();
	
	/**
	 * @return container of attached files
	 */
	AttachmentContainer getAttachments();
	
	/**
	 * @return discussion container
	 */
	Discussion getDiscussion();
	
	/**
	 * Set discussion container
	 * @param disc
	 */
	void setDiscussion(Discussion disc);
	
	/**
	 * @return node of document in tree
	 */
	DocumentNode getNode();
	
	/**
	 * @return likes of this document
	 */
	TupsContainer getTups();
	
	/**
	 * @return extended information about document
	 */
	ProfileContainer getProfile();
	
	/**
	 * @return text of document
	 */
	String getDescription();
	
	/**
	 * Set description
	 * @param desc
	 */
	void setDescription(String desc);
	
	/**
	 * @return date of document creation
	 */
	Date getCreationDate();
	
	/**
	 * @return date of last document update 
	 */
	Date getUpdateDate();
	
	/**
	 * Set update date of this document
	 * @param date
	 */
	void setUpdateDate(Date date);
	void setCreationDate(Date creationDate);

	/**
	 * Set id of document. This method set the same id in
	 * document identity.
	 * 
	 * @param string
	 */
	void setId(String string);

	/**
	 * Set node of document in tree
	 * @param node
	 */
	void setNode(DocumentNode node);

	/**
	 * Set diffs array
	 * @param diffs
	 */
	void setDiffs(List<DocumentDiff> diffs);
}
